{extend name="public/base"}
{block name="body"}
{include file="public/colnav"}
<div class="container">
	<ol class="breadcrumb">
	  <li><a href="/">商城首页</a></li>
	  {$place}
	</ol>
	<div class="row">
		<div class="col-md-2">
			<div class="panel panel-default">
				<div class="panel-heading">
					栏目列表
				</div>
				<ul class="list-group">
				{foreach name="childCategoryList" item="childCatList"}
					<li class="list-group-item">
						<p class="title"><a href="/goodslist?catid={$childCatList.id}">{$childCatList.cname}</a></p>
					
					{if condition="$childCatList['child'] neq array()"}
					<p class="childs-links">
						{foreach name="$childCatList['child']" item="childList"}
							<a href="/goodslist?catid={$childList.id}">{$childList.cname}</a>
						{/foreach}
					</p>
					{/if}					
					</li>
				{/foreach}					
				</ul>
			</div>
		</div>
		<div class="col-md-10">
			<!-- 属性选择 -->
			<table class="table table-bordered">
				<tr>
					<td class="active text-right attr_td">品牌</td>
					<td class="attr_td_link">
						<a href="">爱立信</a>
						<a href="">美的</a>
						<a href="">美的</a>
						<a href="">美的</a>
						<a href="">美的</a>
						<a href="">美的</a>
						<span class="pull-right">
							<button class="btn btn-default btn-xs">多选</button>
						</span>
					</td>
				</tr>
				<tr>
					<td class="active text-right attr_td">品牌</td>
					<td class="attr_td_link">
						<a href="">爱立信</a>
						<a href="">美的</a>
						<a href="">美的</a>
						<a href="">美的</a>
						<a href="">美的</a>
						<a href="">美的</a>
						<span class="pull-right">
							<button class="btn btn-default btn-xs">多选</button>
						</span>
					</td>
				</tr>
				<tr>
					<td class="active text-right attr_td">品牌</td>
					<td class="attr_td_link">
						<a href="">爱立信</a>
						<a href="">美的</a>
						<a href="">美的</a>
						<a href="">美的</a>
						<a href="">美的</a>
						<a href="">美的</a>
						<span class="pull-right">
							<button class="btn btn-default btn-xs">多选</button>
						</span>
					</td>
				</tr>
				<tr>
					<td class="active text-right attr_td">品牌</td>
					<td class="attr_td_link">
						<a href="">爱立信</a>
						<a href="">美的</a>
						<a href="">美的</a>
						<a href="">美的</a>
						<a href="">美的</a>
						<a href="">美的</a>
						<span class="pull-right">
							<button class="btn btn-default btn-xs">多选</button>
						</span>
					</td>
				</tr>
			</table>
			<!-- 商品列表 -->
			<div class="goodslist-wrap">
				<div class="goodslist-item">
					<div class="how-view-select pull-left">
						<button class="btn btn-danger btn-xs">默认&nbsp;<span class="glyphicon glyphicon-arrow-down" aria-hidden="true"></span></button>
						<button class="btn btn-default btn-xs">销量&nbsp;<span class="glyphicon glyphicon-arrow-down" aria-hidden="true"></span></button>
						<button class="btn btn-default btn-xs">价格&nbsp;<span class="glyphicon glyphicon-arrow-down" aria-hidden="true"></span></button>
					</div>
					<div class="price-select pull-left">					
						<form class="form-inline">
							价格区间
						  <div class="form-group">
						    <input type="text" class="form-control input-sm" id="price_sm" placeholder="最低">
						  </div>
						  -
						  <div class="form-group">
						    <input type="text" class="form-control input-sm" id="price_big" placeholder="最高">
						  </div>
						  <button type="submit" class="btn btn-default btn-xs">确定</button>
						</form>						
					</div>
					<div class="tot-page-info pull-right">
						共2001件商品
					</div>
				</div>
				<div class="clearfix"></div>
				<div class="goodslist-inner row">
					{foreach name="goodsList" item="goodsItemVal"}
					<div class="col-md-3">
						<div class="thumbnail goods-list">
					      <div class="goods_pics">
				    		<a href="/goodsinfo?gid={$goodsItemVal.id}">
					      		<img src="{$goodsItemVal.thumb}" alt="..." id="thumbUrl-{$goodsItemVal.id}">
					     	</a>
					      </div>
					      {if condition="$goodsItemVal['img'] neq array()"}
					      <ul class="goods_pics_list" data-id="{$goodsItemVal.id}">
					      	{foreach name="goodsItemVal['img']" item="imgList" key="i"}
					      	<li>
					      		<a href="javascript:">
					      			<img width="30" height="30" src="{$imgList.pic_cover}" alt="" data-img="{$i}">
					      		</a>
					      	</li>
					      	{/foreach}					      	
					      </ul>
					      {/if}
					      <div class="clearfix"></div>
					      <div class="caption">
					      	<p>
					      		<span class="price"><em>¥</em><i>{$goodsItemVal.price}</i></span>
					      		<span class="buynum pull-right">几人购买</span>
					      	</p>
					        <h5>
					        	<a href="/goodsinfo?gid={$goodsItemVal.id}">{$goodsItemVal.name}</a>
					        </h5>
					        <p class="p-commit">
								<span class="label label-danger">自营</span>
								<span class="label label-danger">急速送货</span>
								<span class="label label-danger">当日到达</span>
					        </p>
					      </div>
					    </div>
					</div>
					{/foreach}
				</div>
			</div>
		</div>
	</div>
</div>
{/block}
{block name="jsRes"}
<script>
	$('.category').on('mouseenter', function(event) {
		$('.category-body').removeClass('none');
	}).on('mouseleave',function(event){
		$('.category-body').addClass('none');
	});	
	$('.goods_pics_list').on('mouseenter', 'li', function(event) {
		var imgListId=$(this).parents('.goods_pics_list').attr('data-id');
		$(this).siblings('li').removeClass('cur');
		var url=$(this).addClass('cur').find('img').attr('src');
		setTimeout(function(){
			$('#thumbUrl-'+imgListId).attr('src',url);
		},300);
	});
</script>
{/block}